import Vue from 'vue'
import App from '@/App'
import router from '@/router'
import store from '@/store'
import "swiper/css/swiper.min.css";
// import '@/api' //为了让api的index.js 执行


// //第二种测试
// import {reqCategoryList} from '@/api'
// reqCategoryList()

import '@/mock/mockServer'
// 全局注册组件
import TypeNav from '@/components/TypeNav'
import SwiperLoop from '@/components/SwiperLoop'
Vue.component('TypeNav',TypeNav)
Vue.component('SwiperLoop',SwiperLoop)
Vue.config.productionTip = false

new Vue({
  beforeCreate(){
    Vue.prototype.$bus = this
  },
  render: h => h(App),
  router,//每一个组件内部都可以通过this.$router获取到当前路由器对象 
  store
}).$mount('#app')
